#include "widget.h"
#include "ui_widget.h"
#include "QRect"
#include "QCursor"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    this->setWindowFlags(windowFlags() & ~Qt::WindowCloseButtonHint);

    ui->setupUi(this);
    QPixmap pixmap("://heart-shaped.png");
    pixmap = pixmap.scaled(40,40);
    QCursor cur(pixmap);
    ui->pushButton_2->setCursor(cur);

    QPixmap pixmap_cry("://cry.png");
    pixmap_cry = pixmap_cry.scaled(40,40);
    QCursor cur_cry(pixmap_cry);
    this->setCursor(cur_cry);

    ui->pushButton_3->setEnabled(false);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_2_clicked()
{
    ui->label->setText("太好了我们明天去看电影吧");
    ui->pushButton_3->setEnabled(true);
}


void Widget::on_pushButton_3_clicked()
{
    close();
}


